A Rational Deconstruction of Landin's SECD Machine

نویسنده

  • Olivier Danvy
چکیده

Landin’s SECD machine was the first abstract machine for the λ-calculus viewed as a programming language. Both theoretically as a model of computation and practically as an idealized implementation, it has set the tone for the subsequent development of abstract machines for functional programming languages. However, and even though variants of the SECD machine have been presented, derived, and invented, the precise rationale for its architecture and modus operandi has remained elusive. In this article, we deconstruct the SECD machine into a λinterpreter, i.e., an evaluation function, and we reconstruct λ-interpreters into a variety of SECD-like machines. The deconstruction and reconstructions are transformational: they are based on equational reasoning and on a combination of simple program transformations—mainly closure conversion, transformation into continuation-passing style, and defunctionalization. The evaluation function underlying the SECD machine provides a precise rationale for its architecture: it is an environment-based evalapply evaluator with a callee-save strategy for the environment, a data stack of intermediate results, and a control delimiter. Each of the components of the SECD machine (stack, environment, control, and dump) is therefore rationalized and so are its transitions. The deconstruction and reconstruction method also applies to other abstract machines and other evaluation functions.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Rational Deconstruction of Landin's SECD Machine with the J Operator

Landin’s SECD machine was the first abstract machine for applicative expressions, i.e., functional programs. Landin’s J operator was the first control operator for functional languages, and was specified by an extension of the SECD machine. We present a family of evaluation functions corresponding to this extension of the SECD machine, using a series of elementary transformations (transformatio...

متن کامل

CASE — A Lazy Version of an SECD Machine with a Flat Environment

Graph reduction has been the basis of most fast running implementations of functional languages, with little attention being paid recently to Landin's SECD approach. CASE is an abstract machine which supports applicative programming and is a variation of Landin's classical SECD machine. Its environment is organized in a novel way which makes variable access more efficient by removing the overhe...

متن کامل

A Rational Deconstruction of Landin's J Operator

Landin’s J operator was the first control operator for functional languages. It was specified with an extension of the SECD machine, which was the first abstract machine for functional languages. We present a family of compositional evaluation functions corresponding to this extension of the SECD machine, using a series of elementary transformations (transformation into continuation-passing sty...

متن کامل

The Peter Landin prize

The Peter Landin prize honours the best paper presented at each year’s International Symposium on the Implementation and Application of Functional Languages (IFL). It has been awarded every year since 2003, and covers a range of topics including functional operating systems, static analysis for cost information of functional programs, techniques to improve array processing for data locality and...

متن کامل

Appears in PhysComp96 Workshop on Physics and Computation A logically reversible evaluator for the call-by-name lambda calculus

We present an evaluator for the call-by-name lambda calculus that is logically reversible. This evaluator is therefore a candidate for a computation mechanism that does not dissipate energy due to information erasure. Our design extends Landin's SECD evaluator for the lambda calculus with a history tape H|as in Bennett's constructions of reversible Turing machines|and is hence called SECD-H. Th...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004